package router

import (
	"jgt-wallet/src/context"
	"jgt-wallet/src/controller/dev"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// DevWechatAppMap 微信APP路由映射
func DevWechatAppMap(g *inject.Graph, router *gear.Router) {
	a := new(dev.WechatApp)
	err := g.Provide(&inject.Object{Value: a})
	if err != nil {
		panic(err)
	}

	router.Get("/wechat/app/pay/:orderId/:price", context.WrapContext(a.Pay))
	router.Get("/wechat/app/check/:orderId", context.WrapContext(a.Check))

}
